<template>
  <view class="demo-container">
    <!-- 基础用法 -->
    <view class="demo-block">
      <view class="demo-block__title">基础用法</view>
      <view class="demo-block__content">
        <fu-switch v-model="checked1" />
        <view class="demo-block__value">当前状态：{{ checked1 }}</view>
      </view>
    </view>
    
    <!-- 禁用状态 -->
    <view class="demo-block">
      <view class="demo-block__title">禁用状态</view>
      <view class="demo-block__content">
        <fu-switch v-model="checked2" disabled />
      </view>
    </view>
    
    <!-- 加载状态 -->
    <view class="demo-block">
      <view class="demo-block__title">加载状态</view>
      <view class="demo-block__content">
        <fu-switch v-model="checked3" loading />
      </view>
    </view>
    
    <!-- 自定义颜色 -->
    <view class="demo-block">
      <view class="demo-block__title">自定义颜色</view>
      <view class="demo-block__content">
        <fu-switch
          v-model="checked4"
          active-color="#13ce66"
          inactive-color="#ff4949"
        />
      </view>
    </view>
    
    <!-- 不同尺寸 -->
    <view class="demo-block">
      <view class="demo-block__title">不同尺寸</view>
      <view class="demo-block__content">
        <fu-switch v-model="checked5" size="large" />
        <fu-switch v-model="checked5" />
        <fu-switch v-model="checked5" size="small" />
        <fu-switch v-model="checked5" size="mini" />
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      checked1: false,
      checked2: true,
      checked3: false,
      checked4: true,
      checked5: true
    }
  }
}
</script>

<style lang="scss" scoped>
.demo-container {
  padding: 20rpx;
}

.demo-block {
  margin-bottom: 30rpx;
  
  &__title {
    margin-bottom: 20rpx;
    font-size: var(--fu-font-size-lg);
    color: var(--fu-text-color);
  }
  
  &__content {
    display: flex;
    flex-wrap: wrap;
    gap: 20rpx;
  }
  
  &__value {
    width: 100%;
    margin-top: 20rpx;
    font-size: var(--fu-font-size-sm);
    color: var(--fu-text-color-secondary);
  }
}
</style> 